<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!doctype html>
<html class="no-js">
<head>
<title>我的资料</title>
 <%@ include file="../../include.jsp" %> 
<%@ include file="../../mobilehead_inc.jsp"%>
<script src="/mobile/js/infinitedropdown.min.js"></script>

<style>
.am-direction-nav {
	display: none;
}

#submitButton {
	float: right;
	list-style-type: none;
	margin-top: 5px
}

#myform {
	margin-left: 10px;
	margin-right: 10px;
	width: 90%;
	margin:auto;
}

#myform table tbody tr td input {
	font-size: 15px
}

#myform table tbody tr td {
	color: gray
}

#inTable tr td {
	color: gray
}
.login_logo
	{
	 width: 90%; 
    height: 40px;  
    background-color: #9999ff;
    border-radius: 20px;
   	margin:auto;
    margin-bottom: 20px;
    text-align: center;
	}
 
 .login_logo button
  	{
  	height: 40px;
  	width: 100%;
  	background: transparent;
  	border:0px;
  	color:#fff;
  	font-size:1.6rem;
 	}
</style>
<script>
	//返回上一页	
	function back() {
		history.back()
	}
	
	function save() {
		var fun_ret;
		var vals = $('#myform').serialize();
		console.log(vals);
		$.ajax({
			async : false,
			type : "POST",
			url : '${ctx}/mobile/savePerson',
			data : vals,
			cache : false,
			dataType : 'json',
			success : function(data) {
				if (data.success != 0) {
					//top.Ext.Msg.alert("提示",data.msg);
					
				} else {
					fun_ret = true;
				}
			}
		});
	return fun_ret;
}
	function loginout() {
		$.ajax({
			async : false,
			type : "POST",
			url : '${ctx}/mobile/loginOut',
			data : {},
			cache : false,
			dataType : 'json',
			success : function(data) {
				if (data.success == 0) {
					delCookie("USER_TOKEN")
					window.location.href = "${ctx}/mobile/gomy";	 
					
				} else {
					fun_ret = true;
				}
			}
		});
}
</script>
</head>
<body style="background:#fff">
	<!-- 上部 -->
	<header data-am-widget="header" class="am-header am-header-default joan-head" style="background:#9999FF">

		<div class="am-header-left am-header-nav">

			<a href="javascript:history.back()" class=""> <i
				class="am-icon-mail-reply"></i>
			</a>
		</div>
		<h1 class="am-header-title">
			<a href="#title-link" class=""> 我的资料 </a>
		</h1>

		<div class="am-header-right am-header-nav">
			<a href="${ctx}/mobile/main" target="_self" class=""> <i
				class="am-header-icon am-icon-home"></i>
			</a>
	</header>

	<form class="am-form" id="myform" method="POST" name="myform" style="padding-top:40%">
		<input  type="hidden"    name="userId"  value="${sysUser.userId }"/>
		<table class="am-table">
			<tbody>
				<tr>
					<td>姓名</td>
					<td><input name="userName"
						style="background: transparent; border: 0" 
						value="${sysUser.userName }" /></td>
				</tr>
				<tr>
					<td>昵称</td>
					<td><input name="nickName"
						style="background: transparent; border: 0" 
						value="${sysUser.nickName }" /></td>
				</tr>
			<%-- 	<tr>
					<td>性别</td>
					<td><input name="userName"
						style="background: transparent; border: 0" 
						value="${sysCustomer.sex==1?'男':'女'}" /></td>
				</tr> --%>

				<tr>
					<td>联系电话</td>
					<td><input name="phone"
						style="background: transparent; border: 0" 
						value="${sysUser.phone }" /></td>
				</tr>
				<%-- <tr>
					<td>国家</td>
					<td><input name="nickName"
						style="background: transparent; border: 0" 
						value="${sysCustomer.country }" /></td>
				</tr> --%>
				<%-- <tr>
					<td>省份</td>
					<td><input name="nickName"
						style="background: transparent; border: 0" 
						value="${sysCustomer.province }" /></td>
				</tr> --%>

				<%-- <tr>
					<td>城市</td>
					<td><input name="orderNumber"
						style="background: transparent; border: 0" 
						value="${sysCustomer.city }" /></td>
				</tr> --%>
				<tr>
					<td>收货地址</td>
					<td><input name="address"
						style="background: transparent; border: 0; "
						 value="${sysUser.address }" /></td>
				</tr>
			<%-- 	<tr>
					<td>关注时间</td>
					<td><input name="payPrice"
						style="background: transparent; border: 0; "
						 value="${sysCustomer.subScribeTime }" /></td>
				</tr> --%>
				<tr>
					<td></td>
					<td></td>
				</tr>
			</tbody>
		</table>
</form>
<div class="login_logo"  onclick="save();"><button>保存修改</button></div>
<div class="login_logo"  onclick="loginout();"><button>退出</button></div>
<jsp:include page="../food/bottombar.jsp">
	    <jsp:param name="index" value="4"/>
    </jsp:include>
	
</body>
</html>
